﻿using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using RealtReview.DataAccess.Entities;

namespace RealtyReview.Business.Models.ViewModels
{
    [DataContract]
    public class ApartmentViewModel
    {
        [Required]
        [Display(Name = "Количество комнат")]
        public int RoomsCount { get; set; }

        [Required]
        [Display(Name = "Тип апартамента")]
        public ApartmentType Type { get; set; }

        [DataMember(EmitDefaultValue = false)]
        [Display(Name = "Номер квартиры")]
        public int? FlatNo { get; set; }

        [DataMember(EmitDefaultValue = false)]
        [Display(Name = "Этаж")]
        public int? Floor { get; set; }

        [DataMember(EmitDefaultValue = false)]
        [Display(Name = "Подъезд")]
        public int? Entrance { get; set; }

        [DataMember(EmitDefaultValue = false)]
        [Display(Name = "Всего этажей")]
        public int? TotalFloors { get; set; }

        [DataMember(EmitDefaultValue = false)]
        [Display(Name = "Общая площадь")]
        public double? TotalArea { get; set; }

        [DataMember(EmitDefaultValue = false)]
        [Display(Name = "Жилая площадь")]
        public double? LivingArea { get; set; }

        [DataMember(EmitDefaultValue = false)]
        [Display(Name = "Площадь кухни")]
        public double? KitchenArea { get; set; }

        [DataMember(EmitDefaultValue = false)]
        [Range(1900, 2014)]
        [Display(Name = "Год постройки")]
        public int? YearOfConstruction { get; set; }
    }
}